package com.fengxing.ams.web.facade.mouble.purchase;

import java.util.Date;
import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

public interface IPurchaseDAO extends PagingAndSortingRepository<PurchaseVO, Integer>, JpaSpecificationExecutor<PurchaseVO>  {

	List<PurchaseVO> findByVipId(String id);

	@Query("select t from PurchaseVO t where t.consumeTime > :startTime and t.consumeTime < :endTime order by t.consumeTime")
	List<PurchaseVO> queryByTime(@Param("startTime")Date startTime, @Param("endTime")Date endTime);

}
